import request from '@/utils/request.js'

export const getUserApi = () => {
  return request.get('/my/userinfo')
}
// 调用左侧菜单栏数据
export const getMenusApi = () => {
  return request.get('/my/menus')
}
// 更新用户信息
export const updateUserApi = (obj) => {
  return request.put('/my/userinfo', obj)
}
// 更换头像
export const updateAvatarApi = (avatar) => {
  return request.patch('/my/update/avatar', { avatar })
}
// 修改密码
export const updatePwdApi = (obj) => {
  return request.patch('/my/updatepwd', obj)
}
